package com.xs.common.exception;


import com.xs.common.rest.RestEnum;

/**
 * Created by www on 2017/7/26.
 */
public class BaseException extends RuntimeException {
    private RestEnum restEnum;
    private Object data;

    public BaseException(RestEnum restEnum) {
        this.restEnum = restEnum;
    }

    public BaseException(RestEnum restEnum, String msg) {
        this.restEnum = restEnum;
        this.restEnum.setMessage(msg);
    }

    public BaseException(RestEnum restEnum, Object data) {
        this.restEnum = restEnum;
        this.data = data;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public RestEnum getRestEnum() {
        return restEnum;
    }

    public void setRestEnum(RestEnum restEnum) {
        this.restEnum = restEnum;
    }
}
